import React from "react"
import { useStaticQuery, graphql } from "gatsby"

export default function Footer() {
  const data = useStaticQuery(
    graphql`
      query {
        site {
          siteMetadata {
            title
          }
        }
      }
    `
  )
  const { title } = data.site.siteMetadata
  const year = new Date().getFullYear()
  return (
    <div>
      <footer className="text-xs text-gray-600">
        © {year} {title}.
      </footer>
    </div>
  )
}
